<?php
$this->title="营养包查询";
?>
<div style="max-width: 500px;margin-bottom: 10px">
	<form class="form-inline" action="">
		<div class="form-group">
	        <label class="sr-only">营养包编号</label>
        	<input type="text" class="form-control" name="id" value="<?= Yii::$app->request->get('id')?>">
	    </div>
	    <div class="form-group">
	        <label class="sr-only">规格</label>
        	<select name="level" class="form-control">
            	<option value="1" <?= Yii::$app->request->get('level') == 1 ? 'selected' : ''?>>盒</option>
            	<option value="2" <?= Yii::$app->request->get('level') == 2 ? 'selected' : ''?>>箱</option>
            	<option value="3" <?= Yii::$app->request->get('level') == 3 ? 'selected' : ''?>>托盘</option>
            </select>
	    </div>
      	<button type="submit" class="btn btn-info">查询</button>
	</form>
</div>
<div>
    <p>共 <?= count($list)?> 条数据</p>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th>营养包ID</th>
				<th>生产日期</th>
				<th>父包装编号</th>
				<th>托盘号</th>
				<th>FactoryId</th>
				<th>MaterialId</th>
				<th>ShouldOrgId</th>
			</tr>
		</thead>
		<tbody>
			<?php if (!empty($list)):?>
			<?php foreach ($list as $v):?>
				<tr>
					<td><?= $v['Id']?></td>
					<td><?= $v['PackDate']?></td>
					<td><?= $v['ParentCode']?></td>
					<td><?= $v['RootCode']?></td>
					<td><?= $v['FactoryId']?></td>
					<td><?= $v['MaterialId']?></td>
					<td><?= $v['ShouldOrgId']?></td>
				</tr>
			<?php endforeach;?>
			<?php else:?>
				<tr>
					<td colspan="20">无相关结果</td>
				</tr>
			<?php endif;?>
		</tbody>
	</table>
</div>

